home *** CD-ROM | disk | FTP | other *** search
- Path: news.lpr.carel.fi!usenet
- From: Ari Lukumies <aril@cmt.lpr.mail.carel.fi>
- Newsgroups: comp.lang.c++
- Subject: Re: Need help with *.def file in Borland 4.0 (Alocating memory)
- Date: Fri, 15 Mar 1996 16:10:26 +0200
- Organization: Carelcomp Products
- Message-ID: <31497A52.6EC0@cmt.lpr.mail.carel.fi>
- References: <3148A266.6F24@nando.net>
- NNTP-Posting-Host: renoir.cclahti.carel.fi
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (WinNT; I)
-
- Caius Martius wrote:
- >
- > What I am looking for is help on how to
- > allocate as much memory as possible.
- >
- > I am working on a Windows system with 16 meg of ram and using Borland 4.0
- >
-
- You can use GlobalMemoryAlloc and GlobalMemoryFree for requesting memory. If you
- use 16-bit Windows (Win3x), then use large memory model. You'll still have to
- take into account that the addressing is done in 64kB segments, though. You
- could also try the Huge memory model, but it still imposes the 64kB limit on any
- single object and the objects cannot cross segment boundaries. If, OTOH, you use
- 32-bit Windows (Win95, WinNT or Win3x with Win32s installed), you can use
- malloc/calloc/free and access the memory using linear 32-bit offsets (the
- preferred solution). Bear in mind, that in Win3x with Win32s, you can only use
- 32-bit addressing in Windows programs - there is no 32-bit console subsystem (or
- at least, not without the use of a third-party software, such as Phar-Lap's
- TNT).
-
- Later,
- AriL
- --
- All my opinions are mine and mine alone.
-